<template>
	<view>分类页面
	
	  <view v-for="item in categoryList">
		  
		  {{item.categoryName}}
		  <!-- 使用image标签显示图片 -->
		  <image :src="item.categoryImage"></image>
	  </view>
	
	</view>
</template>

<script>
	import { listCategory } from '@/api/biz/category'
	
	export default {
	  data() {
	    return {
			categoryList:[],
			queryParam:{
			}
	    }
	  },
	  onLoad() {
		  this.getCategoryList()
	  },
		  
	  methods: {
		  getCategoryList(){
			  let query = this.queryParam;
			  listCategory(query).then(res =>{
				  console.log(res.rows)
				  this.categoryList = res.rows;
				  //对图片访问的地址进行调整，配置出全路径
				  this.categoryList.forEach(item =>{
					  item.categoryImage=this.imageBasePath+item.categoryImage;
				  });
			  })
		 }
	 }
	}
</script>

<style>
	
</style>